package com.xingxin.utils;

import java.util.HashMap;
import java.util.Map;

public class ResultUtils {
    public static Map<String,Object> resultMap(String code, String msg, Object data){
        Map<String, Object> resultMap = new HashMap<>();
        resultMap.put("code",code);
        resultMap.put("msg",msg);
        if(data!=null){
            resultMap.put("data",data);
        }
        return resultMap;
    }
}
